home *** CD-ROM | disk | FTP | other *** search
- property pGame, pUrl, pScoreField, pScore, pScoreMod, pErrorChar, pClickOnOnce, pCheckStart
- global gEmail1, gBanSecs, gPlace, gSpot, gGameStatus, gGameOver, gPlay, gEmailNames, gMyNetID, gGameSeconds, key1, gScore
-
- on beginSprite me
- updateStage()
- sprite(3).visible = 1
- stop(sound(1))
- put gScore into member "t_EndScore"
- put "YourFriend@somewhere.com" into member "f_Emailbox1"
- put EMPTY into member "f_Emailbox2"
- put EMPTY into member "f_Emailbox3"
- put EMPTY into member "f_Emailbox4"
- put EMPTY into member "f_Emailbox5"
- end
-
- on exitFrame me
- go(the frame)
- checkGameTime()
- end
-
- on flashButton me, Action
- case Action of
- "PlayAgain":
- puppetSound(3, "buttondown")
- key1 = random(999999)
- if gPlay = 1 then
- pClickOnOnce = 1
- ping()
- gScore = 0
- gGameStatus = "Paused"
- gGameOver = 0
- go("Game")
- updateStage()
- else
- gPlay = 1
- go("Legal")
- end if
- "Submit":
- submitEmail(me)
- "Kewl":
- gsOpenURL("http://www.kewlbox.com")
- "Score":
- pGame = gScore
- pUrl = "http://www.kewlbox.com/scores/direct.cfm?gameId=55&clientId=9"
- pScore = "t_EndScore"
- setScoreParams(me)
- postMe(me)
- "Quit":
- puppetSound(3, "buttondown")
- ping2()
- go("End")
- "Rollover":
- puppetSound(3, "buttonover")
- end case
- end
-
- on ping me
- if pClickOnOnce = 1 then
- gMyNetID = getNetText("http://www.kewlbox.com/ping/ping.cfm?gameId=55&clientId=9")
- if netError() = "OK" then
- put "OK"
- end if
- pCheckStart = 1
- pClickOnOnce = 0
- end if
- end
-
- on ping2 me
- gMyNetID = getNetText("http://www.kewlbox.com/ping/end.cfm?gameId=55&clientId=9&time=" & gGameSeconds)
- if netError() = "OK" then
- put "OK"
- end if
- end
-
- on submitEmail me
- gEmailNames = EMPTY
- pErrorChar = [1: "\", 2: "\", 3: "#", 4: "?", 5: "%", 6: "\\", 7: "/"]
- repeat with i = 1 to 5
- box = "f_EmailBox" & i
- if member(box).text = EMPTY then
- next repeat
- next repeat
- end if
- put "&" & "email" & i & "=" & member(box).text after gEmailNames
- end repeat
- repeat with y = 1 to 2
- z = getProp(pErrorChar, y)
- repeat with x = 1 to 200
- if gEmailNames.char[x] = "$" then
- delete gEmailNames.char[x]
- end if
- end repeat
- end repeat
- gsOpenURL("http://www.kewlbox.com/email/direct.cfm?gameId=55&clientId=9" & gEmailNames)
- end
-
- on setScoreParams me
- pScoreMod = gScore mod 10000
- key2 = (4 * (pScoreMod * pScoreMod)) + (23 * pScoreMod) + (key1 * 54)
- key2 = key2 mod 1000000
- t = "&score=" & gScore
- t = t & "&key1=" & key1
- t = t & "&key2=" & key2
- return t
- end
-
- on postMe me
- put pUrl
- gsOpenURL(pUrl & setScoreParams(me))
- end
-